Eecient Dynamic Dispatch without Virtual Function Tables. the Smalleiiel Compiler
نویسندگان
چکیده
SmallEi el is an Ei el compiler which uses a fast simple type inference mechanism to remove most late binding calls, replacing them by static bindings. Starting from the system's entry point, it compiles only statically living code, which saves compiling and then removing dead code. As the whole system is analyzed at compile time, multiple inheritance and genericity do not cause any overhead. SmallEi el features a coding scheme which eliminates the need for virtual function tables. Dynamic dispatch is implemented without any array access but uses a simple static binary branch code. We show that this implementation makes it possible to use modern hardware very e ciently. It also allows us to inline more calls even when dynamic dispatch is required. Some more dispatch sites are removed after the type inference algorithm has been performed, if the di erent branches of a dispatch site lead to the same code. The advantage of this approach is that it greatly speeds up execution time and considerably decreases the amount of generated code.
منابع مشابه
cient Dynamic Dispatch without Virtual Function Tables
SmallEi el is an Ei el compiler which uses a fast simple type inference mechanism to remove most late binding calls, replacing them by static bindings. Starting from the system's entry point, it compiles only statically living code, which saves compiling and then removing dead code. As the whole system is analyzed at compile time, multiple inheritance and genericity do not cause any overhead. S...
متن کاملFast Algorithms for Compressed Multi-Method Dispatch Tables Generation
The eeciency of dynamic dispatch is a major impediment to the adoption of multi-methods in object-oriented languages. In this paper, we propose a simple multi-method dispatch scheme based on compressed dispatch tables. This scheme is applicable to any object-oriented language using a method precedence order that satisses a speciic monotonous property (e.g., as Cecil and Dylan), and guarantees t...
متن کاملDynamic Dispatch in Object-Oriented Languages
Dynamic binding in object-oriented languages is perhaps the most important semantic aspect of these languages. At the same time it can contribute to ine ciency and lack of robustness because it incurs lookup overheads on function calls and hinders the compiler determining the exact type of objects held in variables or returned by functions. This may, for instance, preclude inlining of small fun...
متن کاملIncremental Table-based Method Dispatch for Reeexive Object-oriented Languages
A collection of algorithms and data structures are presented which provide incremental dispatch table modiication. Incrementally modiied dispatch tables allow table-based dispatch techniques to be used in reeexive, dynamically typed, single-receiver languages with type/implementation-paired multiple inheritance. By storing a small amount of information, the algorithms can incrementally maintain...
متن کاملInheritance Management and Method Dispatch in Reeexive Object-oriented Languages
A collection of algorithms and data structures are presented which represent a generalized framework for inheritance management and method dispatch in reeexive, dynamically typed, single-receiver languages with type/implementation-paired multiple inheritance. By storing a small amount of information, the algorithms can incrementally maintain the entire dispatch environment during the four funda...
متن کامل